<!DOCTYPE html>
<html lang="en">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <title>渲染元素</title>
</head>
<body>
  <div id="app"></div>
  <script src="https://unpkg.com/react@16/umd/react.development.js" crossorigin></script>
  <script src="https://unpkg.com/react-dom@16/umd/react-dom.development.js" crossorigin></script>
  <!-- 使用jsx需要babel转义 -->
  <script src="https://unpkg.com/babel-standalone@6/babel.min.js"></script>
  <!-- 使用babel需要申明type -->
  <script type="text/babel">
  function updata() {
    const tag = document.getElementById('app')
    let now = new Date().toLocaleTimeString()
    ReactDOM.render(
      <h1>hello，{now}</h1>,
      tag
    )
  }
  setInterval(updata,1000)
  </script>
</body>
</html>